import React from "react";
import { legacy_createStore as createStore } from "redux";

const action = {
  type: "CHANGE",
  payload: "kahoohak",
};

const reducer = (state: any, action: any) => {
  switch (action.type) {
    case "CHANGE":
      state = action.payload;
      break;

    default:
      break;
  }

  return state;
};

const store = createStore(reducer);

store.dispatch(action);

export default store;
